package models_main

import (
	"fmt"
	"longmen/server/pkg/db/mysql/models"
	"time"
)

type Statistics struct {
	Id              string    `json:"id" gorm:"primaryKey"` //varchar(20) NOT NULL COMMENT 'DATE_FORMAT(NOW(),''%Y%m%d'')'
	LaunchIos       int       `json:"launch_ios"`           //int(10) DEFAULT '0' COMMENT '苹果日启动数'
	LaunchAndroid   int       `json:"launch_android"`       //int(10) DEFAULT '0' COMMENT '安卓日启动数'
	ActivityIos     int       `json:"activity_ios"`         //int(10) DEFAULT '0' COMMENT '苹果日活用户数'
	ActivityAndroid int       `json:"activity_android"`     //int(10) DEFAULT '0' COMMENT '安卓日活用户数'
	RegistIos       int       `json:"regist_ios"`           //int(10) DEFAULT '0' COMMENT '苹果日注册数'
	RegistAndroid   int       `json:"regist_android"`       //int(10) DEFAULT '0' COMMENT '安卓日注册数'
	RegistPc        int       `json:"regist_pc"`            //int(10) DEFAULT '0' COMMENT 'PC日注册数'
	Time            time.Time `json:"time"`                 //datetime DEFAULT NULL COMMENT '日期'
}

func (Statistics) TableName() string {
	return fmt.Sprintf("%sstatistics", models.Prefix)
}
